<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>后台管理系统</title>
<js href="__PUBLIC__/Js/Jquery/jquery-1.4.4.min.js" />
<link href="../Public/admin/css/golbal.css" rel="stylesheet" type="text/css" />
<link href="../Public/admin/css/adlist.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="tittle">
<span>关键词管理</span>
<a href="{:U('Keyword/keyword')}">添加关键字</a>
</div>
<div class="detab">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr class="thi">
<th width="100">分类</th>
<th width="129">关键字</th>
<th width="245">上升趋势</th>
<th width="195">排序</th>
<th width="153">操作</th>
</tr>
<volist id="vo" name="list">
<tr>
<td >{$vo.category}</td>
<td>{$vo.keyword}</span>
</td>
<eq name="vo['type']" value="0">
<td class="desc" ><span style='margin-left:75px'>下降</span><a href="javascript:void(0);" onclick="asc({$vo.keyid});" > </a></td>
<else/>
<td class="asc" ><span style='margin-left:75px'>上升</span><a href="javascript:void(0);" onclick="desc({$vo.keyid});"> </a></td>
</eq>
<td>{$vo.orders}</td>
<td class="last_bt"><a href="{:U('Keyword/editcate',array('keyid'=>$vo['keyid']))}" class="edit">编辑</a><a href="javascript:void(0);" onclick="dele('{$vo.keyid}');" class="move">删除</a></td>
</tr>
</volist>
</tbody>
</table>
</div>

<div class="num" style="display:none;">

</div>
<div class="clear"></div>
<script type="text/javascript">

//下降
function desc(keyid) {
	keyid = keyid ? keyid : getChecked();
	keyid = keyid.toString();
	if(keyid == '' ) return false;
	$.post("{:U('Keyword/desc')}", {keyid:keyid}, function(res){
		if(res == '1') location.href = location.href;
		else alert('设置下降失败');
	});
}

//上升
function asc(keyid) {
	keyid = keyid ? keyid : getChecked();
	keyid = keyid.toString();
	if(keyid == '' ) return false;
	$.post("{:U('Keyword/asc')}", {keyid:keyid}, function(res){
		if(res == '1') location.href = location.href;
		else alert('设置上升失败');
	});
}

//删除
function dele(keyid){
	keyid = keyid ? keyid : getChecked();
	keyid = keyid.toString();
	if(keyid == '' || !confirm('确定要删除目录？')) return false;
	$.post("{:U('Keyword/dele')}", {keyid:keyid}, function(res){
		if(res == '1') location.href = location.href;
		else alert('该目录删除失败');
	});
}
</script>

</body>
</html>
